package com.DHH.Service.Identity.Impl;
import com.DHH.Entity.Identity.IdentityImgAddress;
import com.DHH.Mapper.Identity.IdentityImgAddressMapper;
import com.DHH.Service.Identity.IIdentityImgAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IdentityImgAddressServiceImpl implements IIdentityImgAddressService{
	
	@Autowired
    private IdentityImgAddressMapper identityImgAddressMapper;
    
   @Override
   public IdentityImgAddress insertIdentityImgAddress(IdentityImgAddress identityImgAddress){
	   
        identityImgAddressMapper.insertSelective(identityImgAddress);
	   return identityImgAddress;
	   
   };
   @Override
   public IdentityImgAddress updateIdentityImgAddress(IdentityImgAddress identityImgAddress){
	     identityImgAddressMapper.updateByPrimaryKeySelective(identityImgAddress);
        return identityImgAddress;
   };
   @Override
   public IdentityImgAddress deleteIdentityImgAddress(IdentityImgAddress identityImgAddress){

	     identityImgAddressMapper.delete(identityImgAddress);
        return identityImgAddress;
   };
    /**
     * 保存或更新操作，返回值为主表
     */
    public IdentityImgAddress saveOrUpdateIdentityImgAddress(IdentityImgAddress identityImgAddress){
        if(identityImgAddress.getId()==null)
        {
            identityImgAddressMapper.insertSelective(identityImgAddress);
        }else{
            identityImgAddressMapper.updateByPrimaryKeySelective(identityImgAddress);
        }
        return identityImgAddress;
    };
}
